<div id="content" class="account">
    <h1><?=$data->TITLE?></h1>
    <h3><?=$data->DESCRIPTION?></h3>
    <form id="form" method="post" action="/json<?=PREFIX.'/'.APP.'/'.CMD?>">
        <div class="formLineLight">
            <label class="formLabel"><?=_('E-mail')?>:  </label><span class="input required">
                <input id="email" name="email" type="text" tabindex="1" value="<?=$data->account->email?>" />
            </span>
            <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Password')?>:  </label>
            <span class="input required">
                <input id="pass" name="pass" type="password" tabindex="2" value="" /></span>
            <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Repeat password')?>:  </label>
            <span class="input required"><input id="repass" name="repass" type="password" tabindex="3" value="" /></span>
            <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Full name')?>:  </label>
            <span class="input required"><input id="name" name="name" type="text" tabindex="4" value="<?=$data->account->fullname?>" /></span>
            <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Sex')?>:  </label>
            <span class="select required">
                <select id="sex" name="sex" tabindex="5" <?=!GENDER_CHANGE?'disabled=disabled':''?>>
                        <option value="female" <?=$data->account->sex=='female'?'selected="selected"':''?>><?=_('Female')?></option>
                    <option value="male" <?=$data->account->sex=='male'?'selected="selected"':''?>><?=_('Male')?></option>
                </select>
            </span>
            <span class="clear"></span>
        </div>
        <div class="formLineDark">
            <label class="formLabel"><?=_('Birth date')?>:  </label>
            <span class="date required">
                <select id="year" name="year" onchange="tool.setday('year','month','day');" tabindex="6">
                    <option><?=_('Year')?></option>
                </select>
                <select id="month" name="month" onchange="tool.setday('year','month','day');" tabindex="7">
                    <option><?=_('Month')?></option>
                </select>
                <select id="day" name="day" tabindex="8">
                    <option><?=_('Day')?></option>
                </select>
            </span>
            <span class="clear"></span>
        </div>
        <h2><span><?=_('Contact')?></span></h2>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Country')?>:  </label>
            <span class="select required">
                <select id="country" name="country" tabindex="9" onchange="tool.regions('/json/common/regions/'+$(this).val(),'region');">
                    <option value="0"><?=_('Select a country')?></option>
                </select>
            </span>
            <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <label class="formLabel"><?=_('Region')?>:  </label>
            <span class="select required">
                <select id="region" name="region" tabindex="10">
                    <option value="0"><?=_('Select a region')?></option>
                </select>
            </span>
            <span class="clear"></span>
        </div>
        <div class="formLineLight">
            <span class="submit">
                <span id="loader" class="loader"><img src="/themes/<?=THEME?>/images/loader.gif" alt="loader" /></span>
                <input id="ID" name="ID" type="hidden" value="<?=$data->account->ID?>" />
                <input id="submit" class="submit" type="submit" value="<?=_('Save my settings')?>" tabindex="11" />
                <span class="clear"></span>
            </span>
            <span class="clear"></span>
        </div>
    </form>
    <div class="clear"></div>
</div>
<div id="aside"></div>
<script type="text/javascript">
    tool.countries('/json/common/countries','country','<?=$data->account->contact->country->code?>');
    tool.regions('/json/common/regions/<?=$data->account->contact->country->code?>','region','<?=$data->account->contact->region->code?>');
    tool.birthdate(<?=@date('Y')-18?>,<?=@date('Y')-88?>,'<?=$data->account->birthday?$data->account->birthday:'0000-00-00'?>');
    tool.form();
</script>